Chloroplasts contain several important membranes, vital for their function. Like mitochondria, chloroplasts have a double-membrane envelope, called the chloroplast envelope. Each membrane is a phospholipid bilayer, between 6 and 8 nm thick, and the two are separated by a gap of 10-20 nm, called the intermembrane space. The outer membrane is permeable to most ions and metabolites, but the inner membrane is highly specialised with transport proteins. Carbohydrates are transported across the outer membrane by a triose phosphate translocator.
The origin of chloroplasts is now largely accepted by the botany community as occurring via endosymbiosis on an ancestral basis with the engulfment of photosynthetic bacterium within the eukaryotic cell. Over millions of years the endosymbiotic cyanobacterium evolved structurally and functionally, retaining its own DNA and the ability to divide by binary fission (not mitotically) but giving up its autonomy by the transfer of some of its genes to the nuclear genome.
Within the inner membrane, in the region called the stroma, there is a system of interconnecting flattened membrane compartments, called the thylakoids. These are the sites of light absorption and ATP synthesis, and contain many proteins, including those involved in the electron transport chain. Photosexnthetic pigments such as chlorophylls a,b and c some others e.g. xanthophylls, carotenoids, phycobilins are also embedded within the granum membrane. With exception of chlorophyll a, all the other associated pigments are "accessory" and transfer energy to the reaction centers, Photosytems I and II.
The membranes of the thylakoid contain photosystems I and II which harvest solar energy to excite electrons which travel down the electron transport chain. This exergonic fall in potential energy along the way is used to draw (not pump!) H+ ions from the lumen of the thylakoid into the cytosol of a blue-green alga (cyanobacterium) or the stroma of a chlorolast. A steep H+ gradient is formed, which allows chemiosmosis to occur, where the thylakoid, transmenbrane ATP-synthase serves a dual function as a "gate" or channel for H+ ions and a catalytic site for the formation of ATP from ADP + a P0-4 ion.
Experiments have shown that the pH within the stroma is about 7.8, while that of the lumen of the thylakoid is 5. This corresponds to a nearly thousandfold difference in concentration of H+ ions. The H+ ions pass down through the ATP-synthase catalytic gate. This chemiosmotic phenomenon occurs in mitochondria. The "osmosis" of H+ or protons not water molecules "downhill." The mean turnover rate of ATP in human cells is about 1 million ATPs-per cell-per-second!